package com.mall.common.exception;

/**
 * @author: 谢君臣
 * @Date: 2022/7/21-19:23
 * @version: 1.0
 * @function:
 */
public enum HttpStatusCode {

    UNDEFINED_EXCEPTION(10000,"未知异常"),
    VALID_EXCEPTION(10001,"参数校验异常"),
    SMS_CODE_EXCEPTION(10002,"验证码获取频率太高"),
    TOO_MANY_REQUEST(10003,"请求太过频繁，稍后再试。"),
//    UNDEFINED_EXCEPTION(10004,"未知异常"),

    USER_NAME_EXIST_EXCEPTION(11001,"当前账号已存在"),
    PHONE_EXIST_EXCEPTION(11002,"当前手机号已存在"),
    REGISTRY_EXCEPTION(11003,"注册失败"),
    PASSWORD_EXCEPTION(11004,"账号与密码不匹配"),

    PRODUCTUP_EXCEPTION(12001,"商品上架异常");

    private int code;
    private String msg;

    HttpStatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
